#include "mytest.h"
#include "ui_mytest.h"



MyTest::MyTest(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::MyTest)
{
    ui->setupUi(this);


}

MyTest::~MyTest()
{
    delete ui;
}


void MyTest::on_pushButton_2_clicked()
{
       QString filename = QFileDialog::getOpenFileName(this, "打开", "/", "Files(*)");
       ui->textEdit->setText(filename);

       QFileInfo fileInfo(filename);
       int size = fileInfo.size();
       ui->textEdit_2->setText(QString().number(size));
}




